home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1765 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: colossus.holonet.net!russell
  2. From: russell@news.mdli.com (Russell Blackadar)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP: syntax calling member fn() of returned object
  5. Date: 12 Jan 1996 19:46:10 GMT
  6. Organization: HoloNet National Internet Access System: 510-704-1058/modem
  7. Message-ID: <4d6dq2$1jr@colossus.holonet.net>
  8. References: <4d3gff$ga4@lib104.its.rpi.edu>
  9. NNTP-Posting-Host: jubal.mdli.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Barry B Floyd (floydb1@lib104.its.rpi.edu) wrote:
  13.  
  14. : What is the syntax (if any) for calling a member function
  15. : of a returned object. For example:
  16.  
  17. (deleted)
  18.  
  19. : I would rather not have to do:
  20.  
  21. :     String a_string ;
  22.  
  23. :     a_string = Function (  ... ) ;
  24.  
  25. : I would rather do something like:
  26.  
  27. :     if ( Function (  ... ).length () == 0 )
  28.  
  29. Ummm, what what the error message when you tried it?  :)
  30.  
  31. The syntax is correct.
  32. You might learn a bit by thinking through what happens at
  33. each step in the expression.  Function creates a temporary
  34. String which need not be assigned to something before it's
  35. used.
  36. --
  37. Russell Blackadar,   russell@mdli.com
  38.